import { format } from 'date-fns'
export const baseData = () => {
  const arr = []
  for (let i = 0; i < 3; i++) {
    const item = []
    for (let j = 0; j < 7; j++) {
      item.push({
        date: j === 0 ? +new Date() : '',
        timePoint: j === 0 ? format(+new Date(), 'HH:mm') : '',
        vomit: '',
        abdominalDistension: '',
        swelling: '',
        constipation: '',
        pain: '',
        insomnia: '',
        cough: '',
        bedsore: '',
        dialectical: '',
        operator: '',
        pgTime: '',
        evaluate: '',
        assessor: ''
      })
    }
    arr.push(item)
  }
  return {
    mainSymptoms: '',
    tonguePulse: '',
    tableData: arr,
    satisfaction: ''
  }
}

export const columns = [
  {
    key: 'date',
    label: '日期',
    width: '90px'
  },
  {
    key: 'timePoint',
    label: '时间',
    width: '80px'
  },
  {
    label: '症状',
    children: [
      {
        key: 'vomit',
        label: '呕吐',
        width: '50px'
      },
      {
        key: 'abdominalDistension',
        label: '腹胀',
        width: '50px'
      },
      {
        key: 'swelling',
        label: '肿胀',
        width: '50px'
      },
      {
        key: 'constipation',
        label: '便秘',
        width: '50px'
      },
      {
        key: 'pain',
        label: '疼痛',
        width: '50px'
      },
      {
        key: 'insomnia',
        label: '失眠',
        width: '50px'
      },
      {
        key: 'cough',
        label: '咳嗽咳痰',
        width: '50px'
      },
      {
        key: 'bedsore',
        label: '潜在褥疮',
        width: '50px'
      }
    ]
  },
  {
    key: 'dialectical',
    label: '辩证施护'
  },
  {
    key: 'operator',
    label: '操作者',
    width: '100px'
  },
  {
    key: 'pgTime',
    label: '评估时间',
    width: '90px'
  },
  {
    key: 'evaluate',
    label: '效果评价',
    width: '50px'
  },
  {
    key: 'assessor',
    label: '评估人员',
    width: '90px'
  }
]

export const satisfactionOptions = [
  {
    label: '好',
    value: '好'
  },
  {
    label: '较好',
    value: '较好'
  },
  {
    label: '一般',
    value: '一般'
  },
  {
    label: '差',
    value: '差'
  }
]
